Skip to content

Split adapter-sqlite into adapter-local, record-adapter-sqlite, and blob-adapter-disk#43

Merged
cuibonobo merged 5 commits into
mainfrom
claude/adapter-split
Jun 25, 2026
Merged

Split adapter-sqlite into adapter-local, record-adapter-sqlite, and blob-adapter-disk#43
cuibonobo merged 5 commits into
mainfrom
claude/adapter-split

Conversation

@cuibonobo

Copy link
Copy Markdown
Member

Summary

  • Replaces @haverstack/adapter-sqlite with three focused packages following a naming convention that encodes adapter type: adapter-* (full StackAdapter), record-adapter-* (StackRecordAdapter), blob-adapter-* (StackBlobAdapter)
  • @haverstack/adapter-local — convenience full StackAdapter wrapping the two packages below; LocalAdapter.initialize() / LocalAdapter.open() are the new drop-in replacement for the old SQLiteAdapter API; also exposes token management methods (createToken, lookupToken, listTokens, revokeToken) for server use
  • @haverstack/record-adapter-sqliteSQLiteRecordAdapter implements StackRecordAdapter; all SQL logic, FTS, pagination, tokens
  • @haverstack/blob-adapter-diskDiskBlobAdapter implements StackBlobAdapter; content-addressed SHA-256 blobs on the local filesystem
  • Users who want a different blob backend (e.g. S3) can import SQLiteRecordAdapter directly and compose it with combineAdapters() from @haverstack/core
  • adapter-local re-exports SQLiteRecordAdapter, DiskBlobAdapter, and combineAdapters so it can serve as the single import for most use cases
  • Updated README.md and docs/spec.md with the new package names, naming convention table, and revised quick-start example

Test plan

  • pnpm test passes across all packages (94 tests: 65 record, 12 blob, 17 local integration)
  • pnpm typecheck passes across all packages
  • Quick-start example in README compiles with updated import (LocalAdapter from @haverstack/adapter-local)
  • adapter-local re-exports SQLiteRecordAdapter and DiskBlobAdapter so existing code that imported those from adapter-sqlite can migrate to a single import

🤖 Generated with Claude Code

https://claude.ai/code/session_01FiDqP6DsUEgtxTaAUj62iE


Generated by Claude Code

claude added 5 commits June 23, 2026 18:38
…lob-adapter-disk

- adapter-local (@haverstack/adapter-local): convenience StackAdapter wrapper combining SQLiteRecordAdapter + DiskBlobAdapter; exposes token methods for server use; matches the old SQLiteAdapter API with initialize()/open() static methods
- record-adapter-sqlite (@haverstack/record-adapter-sqlite): SQLiteRecordAdapter implementing StackRecordAdapter; also provides createToken/lookupToken/listTokens/revokeToken
- blob-adapter-disk (@haverstack/blob-adapter-disk): DiskBlobAdapter implementing StackBlobAdapter; content-addressed SHA-256 storage on the local filesystem

Package naming convention: adapter-* = full StackAdapter, record-adapter-* = StackRecordAdapter, blob-adapter-* = StackBlobAdapter

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FiDqP6DsUEgtxTaAUj62iE
Makes the underlying library (sql.js) explicit, distinguishing it from
other SQLite bindings in the JS ecosystem (better-sqlite3, node-sqlite3, etc.)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FiDqP6DsUEgtxTaAUj62iE
…local

Removes the unused RecordId import from record-adapter-sqljs that was
causing a lint failure. Adds a vitest.config.ts to adapter-local that
aliases workspace packages to their TypeScript sources so tests can run
before dist/ directories are built.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FiDqP6DsUEgtxTaAUj62iE
… to 0.6.0

Fixes the prettier format failure in adapter-local/vitest.config.ts and
removes the redundant combineAdapters value import (re-export covers it).
Bumps all six packages from 0.5.0 to 0.6.0.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FiDqP6DsUEgtxTaAUj62iE
Removes publish:sqlite (adapter-sqlite is gone) and adds publish scripts
for the three replacement packages: adapter-local, record-adapter-sqljs,
and blob-adapter-disk.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FiDqP6DsUEgtxTaAUj62iE
@cuibonobo cuibonobo merged commit c47410c into main Jun 25, 2026
5 checks passed
@cuibonobo cuibonobo deleted the claude/adapter-split branch June 25, 2026 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants